/**
 * Sistem Informasi Penjualan
 * @author Kelompok 1
 * Ligar Sekar Wangi
 * Tri Maryani
 * Winda Rahadyan
 * TIF/IV/A
 */

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.LineBorder;

public class SisInven extends JWindow {
	private Dimension 		dimensi1	= Toolkit.getDefaultToolkit().getScreenSize();
	private JLabel 			labelLogo1	= new JLabel(new ImageIcon ("w.JPG"));
	private JProgressBar 	barisProgres1= new JProgressBar();
	private int 			time1 		= 0;
	private Timer 			timer1;

	public SisInven () 
		{
 		Color Warna = Color.blue;
		barisProgres1.setValue(0);
		barisProgres1.setPreferredSize(new Dimension(100,15));
		barisProgres1.setBackground(Color.white);
		barisProgres1.setForeground(Color.red);
		barisProgres1.setStringPainted(true);
		barisProgres1.setBorder(new LineBorder (Warna, 1));
		labelLogo1.setBorder (new LineBorder (Warna, 1));
		getContentPane().add(labelLogo1, BorderLayout.NORTH);
		getContentPane().add(barisProgres1,BorderLayout.CENTER);
		timer1=new Timer(50,new ActionListener()
			{
			public void actionPerformed(ActionEvent evt)
				{
				time1++;
				barisProgres1.setValue(time1);
				if(barisProgres1.getPercentComplete()==1.0)
					{
					timer1.stop();
					setVisible(false);
					new Menu_Utama();
				    }	
			    }
		     });
		timer1.start();
		pack();
		setLocation (dimensi1.width / 2 - getWidth() / 2, dimensi1.height / 2 - getHeight() / 2);	
		show();
	}

	public static void main (String args[]) { 
		new SisInven (); 
	}
}